package sk.ogame.brain.thing;

import sk.ogame.realm.exception.BaseException;
import sk.ogame.realm.service.BuildingService;

import java.beans.Transient;
import java.util.Collections;
import java.util.Set;

/**
 * @author 支绍昆
 * 2023/2/17
 * 建筑升级
 **/
public class BuildingThing extends Thing {

    private final int planetId;
    private final int buildId;
    private final Operate operate;

    public enum Operate {leveUp;}

    public BuildingThing(int planetId, int buildId, Operate operate) {
        this.planetId = planetId;
        this.buildId = buildId;
        this.operate = operate;
    }

    @Override
    public Set<Class<? extends BaseException>> couldSolve() {
        return Collections.emptySet();
    }

    @Transient
    @Override
    public Class<? extends ThingService> getDealBeanType() {
        return BuildingService.class;
    }

    @Override
    public String toString() {
        return "planet " + planetId + " building [" + buildId + "] " + operate.name() +" .";
    }


    public int getPlanetId() {
        return planetId;
    }

    public int getBuildId() {
        return buildId;
    }

    public Operate getOperate() {
        return operate;
    }

}
